/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package aso.upna.controllers;

import java.awt.Component;
import javax.swing.JProgressBar;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author triki
 */
class ProgressBarRenderer extends JProgressBar implements TableCellRenderer {

    private int value;

    public ProgressBarRenderer() {
        super();
        value = 0;
        super.setVisible(false);
    }

    public void setPorcentaje(int v)
    {
        value = v;
    }

    public Component getTableCellRendererComponent(JTable table, Object progr,
                                                    boolean isSelected,
                                                    boolean hasFocus,
                                                    int row, int col) {
     super.setVisible(true);
     return this;
    }
}

